<?php
$rules = array(
    // 事件
    [
        'class' => 'yii\rest\UrlRule',
        'controller' => 'ua/event',
        'pluralize' => false,
        'extraPatterns' => [
            'POST init-data'    => 'init-data', //获取数据
            'POST check-uuid'    => 'check-uuid', //检查uuid是否在库里
            'POST save-ping'    => 'save-ping', //保存ping记录
            'POST check-online'    => 'check-online', //定期检查设备在线事件
        ]
    ],

    [
        'class' => 'yii\rest\UrlRule',
        'controller' => 'ua/demo',
        'pluralize' => false,
        'extraPatterns' => [
            'GET version'    => 'version',
            'GET promotion'  => 'promotion',
            'GET goods'      => 'goods',
        ]
    ]
);
return $rules;
